import 'package:cbec_app/components/base/base_chekbox.dart';
import 'package:cbec_app/components/base/base_image.dart';
import 'package:cbec_app/components/common/common_style.dart';
import 'package:cbec_app/utils/ThemeConfig.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

///商品优惠item
class GoodsDiscountItem extends StatefulWidget {
  const GoodsDiscountItem({super.key});

  @override
  State<StatefulWidget> createState() {
    return _GoodsDiscountItemState();
  }
}

class _GoodsDiscountItemState extends State<GoodsDiscountItem> {
  @override
  Widget build(BuildContext context) {
    return SizedBox(
      width: 106.w,
      child: Stack(
        children: [
          Column(
            children: [
              BaseImage(
                url:
                    'https://t7.baidu.com/it/u=2621658848,3952322712&fm=193&f=GIF',
                width: 106.w,
                height: 106.w,
              ),
              SizedBox(height: 8.h,),
              Row(
                mainAxisAlignment:MainAxisAlignment.spaceBetween,
                children: [
                  Text('￥89',style: setTextStyle(14, FontWeight.w700, ThemeConfig.mainTextColor),), 
                  Text('x1',style: setTextStyle(12, FontWeight.w300, Color(0xff9f9f9f)),)
                ],
              )
            ],
          ),
          Positioned(
            right: 8,
            top: 8,
              child: BaseCheckBox(
            value: true,
          ))
        ],
      ),
    );
  }
}
